package com.app.util.db.tool;

import com.app.util.db.DBPool;

abstract class SQLShell {

	protected final DbUtil dbUtil = new DbUtil();

	protected final DBPool dbPool;

	SQLShell(DBPool dbPool) {
		this.dbPool = dbPool;
		this.dbUtil.setQueryTimeout(dbPool.getPoolConf().getDefaultQueryTimeout());
	}

	public DBPool getDbPool() {
		return dbPool;
	}

	public int getQueryTimeout() {
		return dbUtil.queryTimeout;
	}

	public void setQueryTimeout(int queryTimeout) {
		dbUtil.queryTimeout = queryTimeout;
	}
} 
